home *** CD-ROM | disk | FTP | other *** search
/ Amiga News 96 / Amiga News 96.iso / amig_ad_os / avm / prog / source / sendmessageto.avmsrc < prev    next >
Text File  |  1977-12-31  |  8KB  |  275 lines

  1. startrecord=true
  2. label=sendMessageTo
  3. nodetype=8
  4. line1=procedure
  5. line2=parse arg mailbox, originMailbox, number, actualFilename, fileType, introFileName, acidName, acidNumber
  6. line3=handle = makeUniqueFile()
  7. line4=call initLogEntry()
  8. line5=log.returnNumber = number
  9. line6=log.filename = actualFilename
  10. line7=log.type = fileType; log.returnSendFunc = 'DefaultSender'
  11. line8=log.returnRetry = 3; log.returnInterval = 5
  12. line9=log.origMailbox = originMailbox
  13. line10=log.altFileName = introFileName; log.cidName = acidName; log.cidNumber = acidNumber
  14. nextactiontype=3
  15. nextactionaction=
  16. endrecord=true
  17. startrecord=true
  18. label=
  19. nodetype=8
  20. line1=
  21. line2=if upper(log.type) = 'VOICE' & ~exists(voiceFile(mailbox, log.fileName)) then call smNeedToRecordOut
  22. line3=if ~exists(voiceFile(mailbox, log.altFileName)) then call smNeedToRecordIntro
  23. line4=if log.returnNumber = '' then do; call smNeedToEnterTel(); signal sendMessageToMenu; end
  24. line5=
  25. line6=
  26. line7=
  27. line8=
  28. line9=
  29. line10=
  30. nextactiontype=3
  31. nextactionaction=
  32. endrecord=true
  33. startrecord=true
  34. label=
  35. nodetype=1
  36. filename='avm:voices/numberToSendTo'
  37. comment=The number to send this message to is ...
  38. keyactiontype=3
  39. keyactionaction=
  40. faxactiontype=2
  41. faxactionaction=call cleanSendMessageTo(); signal stdfax
  42. dataactiontype=2
  43. dataactionaction=call cleanSendMessageTo(); signal stddata
  44. busyactiontype=2
  45. busyactionaction=call cleanSendMessageTo(); signal stdbusy
  46. abortactiontype=2
  47. abortactionaction=call cleanSendMessageTo(); signal stdabort
  48. erroractiontype=2
  49. erroractionaction=call cleanSendMessageTo(); signal stderror
  50. nextactiontype=3
  51. nextactionaction=
  52. endrecord=true
  53. startrecord=true
  54. label=
  55. nodetype=8
  56. line1=call playNumber(log.returnNumber)
  57. line2=
  58. line3=
  59. line4=
  60. line5=
  61. line6=
  62. line7=
  63. line8=
  64. line9=
  65. line10=
  66. nextactiontype=3
  67. nextactionaction=
  68. endrecord=true
  69. startrecord=true
  70. label=
  71. nodetype=12
  72. nextactiontype=3
  73. nextactionaction=
  74. endrecord=true
  75. startrecord=true
  76. label=sendMessageToMenu
  77. nodetype=3
  78. filename='avm:voices/editSendMessage'
  79. comment=Press 1 to change the telephone number, 2 to record the outgoing message, 3 to edit the introduction, or 4 to go ahead and send this message. [*=hangup, 0=repeat menu, #=previous menu]
  80. retries=3
  81. zeroactiontype=0
  82. zeroactionaction=sendMessageToMenu
  83. oneactiontype=2
  84. oneactionaction=call playNumber(log.returnNumber); log.returnNumber = getNumber(); signal sendMessageToMenu
  85. twoactiontype=2
  86. twoactionaction=if upper(log.type) = 'VOICE' then call recordMessage(voiceFile(mailbox, log.filename)); signal sendMessageToMenu
  87. threeactiontype=2
  88. threeactionaction=call editIntro(); signal sendMessageToMenu
  89. fouractiontype=2
  90. fouractionaction=if smCanSend() then do; call saveLogEntry(mailbox, handle); return 1; end; else signal sendMessageToMenu
  91. fiveactiontype=3
  92. fiveactionaction=
  93. sixactiontype=3
  94. sixactionaction=
  95. sevenactiontype=3
  96. sevenactionaction=
  97. eightactiontype=3
  98. eightactionaction=
  99. nineactiontype=3
  100. nineactionaction=
  101. poundactiontype=2
  102. poundactionaction=call cleanSendMessageTo(); return 0
  103. staractiontype=2
  104. staractionaction=call cleanSendMessageTo(); signal answerVoiceDone
  105. faxactiontype=2
  106. faxactionaction=call cleanSendMessageTo(); signal stdfax
  107. dataactiontype=2
  108. dataactionaction=call cleanSendMessageTo(); signal stddata
  109. busyactiontype=2
  110. busyactionaction=call cleanSendMessageTo(); signal stdbusy
  111. timedoutactiontype=2
  112. timedoutactionaction=call cleanSendMessageTo(); signal answerVoiceDone
  113. abortactiontype=2
  114. abortactionaction=call cleanSendMessageTo(); signal stdabort
  115. erroractiontype=2
  116. erroractionaction=call cleanSendMessageTo(); signal stderror
  117. nextactiontype=2
  118. nextactionaction=call cleanSendMessageTo(); return 0
  119. endrecord=true
  120. startrecord=true
  121. label=cleanSendMessageTo
  122. nodetype=8
  123. line1=if verify(log.fileName, '/:', 'M') = 0 then
  124. line2=  address command 'delete >nil: <nil: quiet' voiceFile('Outgoing', log.fileName) || '#?'
  125. line3=if verify(log.altFileName, '/:', 'M') = 0 then
  126. line4=  address command 'delete >nil: <nil: quiet' voiceFile('Outgoing', log.altFileName) || '#?'
  127. line5=
  128. line6=
  129. line7=
  130. line8=
  131. line9=
  132. line10=
  133. nextactiontype=2
  134. nextactionaction=return
  135. endrecord=true
  136. startrecord=true
  137. label=smNeedToRecordOut
  138. nodetype=1
  139. filename='avm:voices/NeedToRecordOutgoing'
  140. comment=You need to record an outgoing message.
  141. keyactiontype=3
  142. keyactionaction=
  143. faxactiontype=2
  144. faxactionaction=call cleanSendMessageTo(); signal stdfax
  145. dataactiontype=2
  146. dataactionaction=call cleanSendMessageTo(); signal stddata
  147. busyactiontype=2
  148. busyactionaction=call cleanSendMessageTo(); signal stdbusy
  149. abortactiontype=2
  150. abortactionaction=call cleanSendMessageTo(); signal stdabort
  151. erroractiontype=2
  152. erroractionaction=call cleanSendMessageTo(); signal stderror
  153. nextactiontype=3
  154. nextactionaction=
  155. endrecord=true
  156. startrecord=true
  157. label=
  158. nodetype=12
  159. nextactiontype=2
  160. nextactionaction=return
  161. endrecord=true
  162. startrecord=true
  163. label=smNeedToRecordIntro
  164. nodetype=1
  165. filename='avm:voices/NeedToRecordIntro'
  166. comment=You need to record an intro file
  167. keyactiontype=3
  168. keyactionaction=
  169. faxactiontype=2
  170. faxactionaction=call cleanSendMessageTo(); signal stdfax
  171. dataactiontype=2
  172. dataactionaction=call cleanSendMessageTo(); signal stddata
  173. busyactiontype=2
  174. busyactionaction=call cleanSendMessageTo(); signal stdbusy
  175. abortactiontype=2
  176. abortactionaction=call cleanSendMessageTo(); signal stdabort
  177. erroractiontype=2
  178. erroractionaction=call cleanSendMessageTo(); signal stderror
  179. nextactiontype=3
  180. nextactionaction=
  181. endrecord=true
  182. startrecord=true
  183. label=
  184. nodetype=12
  185. nextactiontype=2
  186. nextactionaction=return
  187. endrecord=true
  188. startrecord=true
  189. label=smNeedToEnterTel
  190. nodetype=1
  191. filename='avm:voices/NeedToEnterTel'
  192. comment=You need to enter a telephone number for this outgoing message
  193. keyactiontype=3
  194. keyactionaction=
  195. faxactiontype=2
  196. faxactionaction=call cleanSendMessageTo(); signal stdfax
  197. dataactiontype=2
  198. dataactionaction=call cleanSendMessageTo(); signal stddata
  199. busyactiontype=2
  200. busyactionaction=call cleanSendMessageTo(); signal stdbusy
  201. abortactiontype=2
  202. abortactionaction=call cleanSendMessageTo(); signal stdabort
  203. erroractiontype=2
  204. erroractionaction=call cleanSendMessageTo(); signal stderror
  205. nextactiontype=3
  206. nextactionaction=
  207. endrecord=true
  208. startrecord=true
  209. label=
  210. nodetype=12
  211. nextactiontype=2
  212. nextactionaction=return
  213. endrecord=true
  214. startrecord=true
  215. label=editIntro
  216. nodetype=3
  217. filename='avm:voices/EditIntro'
  218. comment=Press 1 to use the default intro file, 2 to use a personalized intro file, or 3 to record the intro file
  219. retries=3
  220. zeroactiontype=0
  221. zeroactionaction=editIntro
  222. oneactiontype=2
  223. oneactionaction=log.altFileName = voiceFile(log.origMailbox, 'Introduction')
  224. twoactiontype=2
  225. twoactionaction=log.altFileName = makeUniqueFile()
  226. threeactiontype=2
  227. threeactionaction=call recordMessage(voiceFile(mailbox, log.altFileName))
  228. fouractiontype=3
  229. fouractionaction=
  230. fiveactiontype=3
  231. fiveactionaction=
  232. sixactiontype=3
  233. sixactionaction=
  234. sevenactiontype=3
  235. sevenactionaction=
  236. eightactiontype=3
  237. eightactionaction=
  238. nineactiontype=3
  239. nineactionaction=
  240. poundactiontype=2
  241. poundactionaction=return
  242. staractiontype=2
  243. staractionaction=call cleanSendMessageTo(); signal answerVoiceDone
  244. faxactiontype=2
  245. faxactionaction=call cleanSendMessageTo(); signal stdfax
  246. dataactiontype=2
  247. dataactionaction=call cleanSendMessageTo(); signal stddata
  248. busyactiontype=2
  249. busyactionaction=call cleanSendMessageTo(); signal stdbusy
  250. timedoutactiontype=2
  251. timedoutactionaction=call cleanSendMessageTo(); signal answerVoiceDone
  252. abortactiontype=2
  253. abortactionaction=call cleanSendMessageTo(); signal stdabort
  254. erroractiontype=2
  255. erroractionaction=call cleanSendMessageTo(); signal stderror
  256. nextactiontype=0
  257. nextactionaction=editIntro
  258. endrecord=true
  259. startrecord=true
  260. label=smCanSend
  261. nodetype=8
  262. line1=if log.returnNumber = '' then do; call smNeedToEnterTel(); return 0; end
  263. line2=if upper(log.type) = 'VOICE' & ~exists(voiceFile(mailbox, log.fileName)) then do; call smNeedToRecordOut(); return 0; end
  264. line3=
  265. line4=
  266. line5=
  267. line6=
  268. line7=
  269. line8=
  270. line9=
  271. line10=
  272. nextactiontype=2
  273. nextactionaction=return 1
  274. endrecord=true
  275.